<template>
	<view class="container">
		<view class="search-bar">
			<input type="text" placeholder="搜索" class="search-input" />
			<button class="search-button">搜索</button>
			<text class="map-mode" @click="goToMap">地图模式</text>
		</view>

		<view class="list">
			<view class="list-item" v-for="(item, index) in items" :key="index">
				<image class="thumbnail" :src="item" />

				<view class="info">
					<text class="name">中国石油加油站</text>
					<view class="price-rating">
						<text class="price">￥5.97/升</text>
						<text class="condition">满200减20</text>
					</view>
					<text class="address">山阳区人民中路32号</text>
				</view>

				<view class="distance">
					<text>44m</text>
					<image class="navigation-icon" src="/path/to/navigation-icon.png" />
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				items: ['/static/1.jpg', '/static/2.jpg', '/static/3.jpg']
			};
		},
		methods: {
			goToMap() {
				uni.navigateTo({
					url: '/pages/syx-JiuJinJiaYou/ditumoshi/ditumoshi'
				});
			}
		}
	};
</script>

<style>
	.container {
		padding: 10px;
	}

	.search-bar {
		display: flex;
		align-items: center;
		margin-bottom: 10px;
	}

	.search-input {
		flex: 1;
		padding: 5px;
		border: 1px solid #ccc;
		border-radius: 4px;
	}

	.search-button {
		margin-left: 5px;
		background-color: #3A79FF;
		color: #fff;
		border: none;
		border-radius: 4px;
	}

	.map-mode {
		margin-left: 10px;
		color: #007BFF;
		cursor: pointer;
	}

	.list {
		display: flex;
		flex-direction: column;
		gap: 10px;
	}

	.list-item {
		display: flex;
		align-items: center;
		background-color: #fff;
		padding: 10px;
		border-radius: 5px;
		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	}

	.thumbnail {
		width: 60px;
		height: 60px;
		margin-right: 10px;
		border-radius: 5px;
	}

	.info {
		flex: 1;
		display: flex;
		flex-direction: column;
	}

	.name {
		font-size: 16px;
		font-weight: bold;
		margin-bottom: 5px;
	}

	.price-rating {
		display: flex;
		align-items: center;
	}

	.price {
		font-size: 14px;
		color: #f00;
		margin-right: 5px;
	}

	.condition {
		font-size: 14px;
		color: #FFA500;
	}

	.address {
		font-size: 12px;
		color: #666;
	}

	.distance {
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.navigation-icon {
		width: 20px;
		height: 20px;
		margin-top: 5px;
	}
</style>